package com.cty.B_SpecialDataStructures.C_PriorityQ.PriorityQArray;

import com.cty.F_common.DataItem;

/**
 * @Auther: cty
 * @Date: 2020/6/14 20:34
 * @Description:  测试 数组实现优先级队列
 * @version: 1.0
 */
public class PriorityQArrayApp {
    public static void main(String[] args) {
        PriorityQArray PQ = new PriorityQArray(5);

        System.out.println("测试 insert()");
        PQ.insert(new DataItem(66));
        PQ.insert(new DataItem(22));
        PQ.insert(new DataItem(44));
        PQ.insert(new DataItem(11));
        PQ.insert(new DataItem(88));
        PQ.insert(new DataItem(55));
        PQ.displayPriorityQ();
        System.out.println("---------------------------------------------------------");

        System.out.println("测试 remove()");
        PQ.remove();
        PQ.remove();
        PQ.displayPriorityQ();
        System.out.println("---------------------------------------------------------");
    }  // end main()
}  // end PriorityQArrayApp{}

/**
 * 测试 insert()
 * 11 22 44 66 88
 * ---------------------------------------------------------
 * 测试 remove()
 * 11 22 44
 * ---------------------------------------------------------
 */
